package com.market.domain;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.faces.context.FacesContext;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.primefaces.model.DefaultStreamedContent;
import org.primefaces.model.StreamedContent;
import org.primefaces.model.UploadedFile;

import com.market.domain.transients.report.WhoBuyIt;

@Entity
@Table(name = "product")
public class Product extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2619982572074619597L;
	// This is the base directory for all product's icon
	@Transient
	private String iconDir = "uploadedFiles/icons/product";

	// This is use for temporary saving icon for uploading
	@Transient
	private UploadedFile icon16;
	@Transient
	private UploadedFile icon32;
	@Transient
	private UploadedFile icon64;
	@Transient
	private UploadedFile icon128;

	@Transient
	private Integer quantity = 1; // This is the quantity customer going to add
									// to
									// shopping cart; default set to 1

	public enum STATUS {
		NOT_READY, OPEN, CLOSED;

		private String getMessage(String key) {
			Locale locale = FacesContext.getCurrentInstance().getViewRoot()
					.getLocale();
			java.util.ResourceBundle resBundle = ResourceBundle.getBundle(
					"com.market.messages", locale);
			return resBundle.getString(key);
		}

		public String getLabel() {
			return this.getMessage("PRODUCT_STATUS_" + this.toString());
		}
	}

	public enum SOURCE {
		OUR_FARM, FARM_DIRECT, PRODUCER_DIRECT, MARKET;

		private String getMessage(String key) {
			Locale locale = FacesContext.getCurrentInstance().getViewRoot()
					.getLocale();
			java.util.ResourceBundle resBundle = ResourceBundle.getBundle(
					"com.market.messages", locale);
			return resBundle.getString(key);
		}

		public String getLabel() {
			return this.getMessage("PRODUCT_SOURCE_" + this.toString());
		}
	}

	public enum TYPE {
		LEAF_VEGETABLE, FRUIT_VEGETABLE, ROOT_VEGETABLE, STEM_VEGETABLE, OTHER_VEGETABEL, FRUIT, TOFU, NOODLE, BAKERY, SAUCE, SEASONING, SPICY, SNACK, DRIED_FOOD, FROZEN_FOOD, MEAT, PREPARED_FOOD, PRESERVED_FOOD, CLEARANCE, OTHER;

		private String getMessage(String key) {
			Locale locale = FacesContext.getCurrentInstance().getViewRoot()
					.getLocale();
			java.util.ResourceBundle resBundle = ResourceBundle.getBundle(
					"com.market.messages", locale);
			return resBundle.getString(key);
		}

		public String getLabel() {
			return this.getMessage("PRODUCT_TYPE_" + this.toString());
		}

	}

	@Override
	public boolean equalsId(Object o) {
		if ((o instanceof Product) && ((Product) o).getId().equals(this.id)) {
			return true;
		}
		return false;
	}
	
	
	public Boolean getIsCanCaculateExactAmount(){
		return (this.priceUnit.trim().equals(this.stockUnit.trim()));
	}

	public String getNameLabel() {
		return super.getLabel("Name", super.getLocale());
	}

	public String getNameLabel(Locale locale) {
		return super.getLabel("Name", locale);
	}

	public String getPriceUnitLabel() {
		return super.getLabel("PriceUnit", super.getLocale());
	}

	public String getPriceUnitLabel(Locale locale) {
		return super.getLabel("PriceUnit", locale);
	}

	public String getUnitPriceLabel() {
		return super.getLabel("UnitPrice", super.getLocale());
	}

	public String getStockUnitLabel() {
		return super.getLabel("StockUnit", super.getLocale());
	}
	
	public String getStockUnitLabel(Locale locale) {
		return super.getLabel("StockUnit", locale);
	}

	public String getSpecificationDescLabel() {
		return super.getLabel("SpecificationDesc", super.getLocale());
	}
	
	public String getSpecificationDescLabel(Locale locale) {
		return super.getLabel("SpecificationDesc", locale);
	}

	public String getShortMessageLabel() {
		return super.getLabel("ShortMessage", super.getLocale());
	}

	public String getIcon() {
		return this.iconDir + "/" + this.id + "/";
	}

	public StreamedContent getIcon16DataStream() {
		if (this.icon16 != null) {
			try {
				return new DefaultStreamedContent(this.icon16.getInputstream(),
						"image/jpeg");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		} else {
			return null;
		}
	}

	public StreamedContent getIcon32DataStream() {
		if (this.icon32 != null) {
			try {
				return new DefaultStreamedContent(this.icon32.getInputstream(),
						"image/jpeg");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		} else {
			return null;
		}
	}

	public StreamedContent getIcon64DataStream() {
		if (this.icon64 != null) {
			try {
				return new DefaultStreamedContent(this.icon64.getInputstream(),
						"image/jpeg");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		} else {
			return null;
		}
	}

	public StreamedContent getIcon128DataStream() {
		if (this.icon128 != null) {
			try {
				return new DefaultStreamedContent(
						this.icon128.getInputstream(), "image/jpeg");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		} else {
			return null;
		}
	}

	public ProductInfo getProductInfo() {
		if (productInfo == null) {
			productInfo = new ProductInfo();
			productInfo.setIsNew(true);
		}
		return productInfo;
	}

	public Boolean getIsOnSpecial() {
		return !(this.price.equals(this.specialPrice));
	}

	public Boolean getIsLowInventory() {
		return this.inventory < 5;
	}

	public Boolean getIsOutOfStock() {
		return this.inventory <= 0;
	}
	
	@Transient
	private List<WhoBuyIt> whoBuyIts;

	public List<WhoBuyIt> getWhoBuyIts() {
		return whoBuyIts;
	}


	public void setWhoBuyIts(List<WhoBuyIt> whoBuyIts) {
		this.whoBuyIts = whoBuyIts;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id = 0L;
	@Column(nullable = false, length = 100)
	private String name;
	@Column(length = 100)
	private String chineseName;
	@Column(length = 100)
	private String frenchName;
	@Column(length = 50, nullable = false, unique = true)
	private String number;
	@Column(length = 100)
	private String storageLocation;
	@Column(nullable = false, columnDefinition = "bit(1) DEFAULT 0")
	private Boolean isOrganic = Boolean.FALSE;
	@Column(nullable = false, columnDefinition = "bit(1) DEFAULT 0")
	private Boolean isTaxable = Boolean.FALSE;
	@Enumerated(EnumType.STRING)
	private TYPE type = TYPE.LEAF_VEGETABLE;
	@Enumerated(EnumType.STRING)
	private SOURCE source = SOURCE.MARKET;
	@Column(length = 100)
	private String origin;
	@Enumerated(EnumType.STRING)
	private STATUS status = STATUS.OPEN;
	@Column(columnDefinition = "Double Default 0")
	private Double price = 0D;
	@Column(columnDefinition = "Double Default 0")
	private Double specialPrice = 0D;
	@Column(length = 50)
	private String priceUnit; // eg. lb
	@Column(length = 50)
	private String chinesePriceUnit;
	@Column(length = 50)
	private String frenchPriceUnit;
	@Column(length = 50)
	private String unitPrice; // $0.99/lb
	@Column(length = 50)
	private String chineseUnitPrice;
	@Column(length = 50)
	private String frenchUnitPrice;
	@Column(columnDefinition = "Long Default 0")
	private Long inventory = 0L;
	@Column(columnDefinition = "Double Default 1")
	private Double specification = 1D; // This is the ratio between price Unit
										// and
										// stock unit;
	@Column(length = 50)
	private String specificationDesc;
	@Column(length = 50)
	private String chineseSpecificationDesc;
	@Column(length = 50)
	private String frenchSpecificationDesc;
	@Column(length = 50)
	private String stockUnit; // eg. pcs
	@Column(length = 50)
	private String chineseStockUnit;
	@Column(length = 50)
	private String frenchStockUnit;
	@Column(columnDefinition = "Double Default 0")
	private Double purchasePrice = 0D;
	@Column(length = 50)
	private String purchaseUnit;
	@Column(columnDefinition = "int Default 1")
	private Integer purchaseToPriceSpec = 1; // eg. Purchase 1 box = 30 bag;
	@Column(length = 100)
	private String icon;
	@Column(columnDefinition = "int Default 50")
	private Integer recommendIndex = 50;
	@Column(columnDefinition = "int Default 0")
	private Integer orderLimit = 0;
	@Column(length = 50)
	private String shortMessage;
	@Column(length = 50)
	private String chineseShortMessage;
	@Column(length = 50)
	private String frenchShortMessage;
	@Column(nullable = false, columnDefinition = "bit(1) DEFAULT 1")
	private Boolean isFreshFood = Boolean.TRUE;
	@Column(nullable = false, columnDefinition = "bit(1) DEFAULT 0")
	private Boolean isFrozenFood = Boolean.FALSE;
	@Column
	@Temporal(TemporalType.DATE)
	private java.util.Date bestBefore;
	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private ProductInfo productInfo;
	@ManyToMany(fetch = FetchType.LAZY)
	private List<Picture> pictures = new ArrayList<Picture>();
	@ManyToOne(fetch = FetchType.EAGER)
	private Supplier supplier;
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<PurchaseSchedule> purchaseSchedules = new ArrayList<PurchaseSchedule>();

	public String getIconDir() {
		return iconDir;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		if (quantity < 1) {
			this.quantity = 1;
		} else {
			this.quantity = quantity;
		}
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getChineseName() {
		return chineseName;
	}

	public void setChineseName(String chineseName) {
		this.chineseName = chineseName;
	}

	public String getFrenchName() {
		return frenchName;
	}

	public void setFrenchName(String frenchName) {
		this.frenchName = frenchName;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	public String getStorageLocation() {
		return storageLocation;
	}

	public void setStorageLocation(String storageLocation) {
		this.storageLocation = storageLocation;
	}

	public Boolean getIsOrganic() {
		return isOrganic;
	}

	public void setIsOrganic(Boolean isOrganic) {
		this.isOrganic = isOrganic;
	}

	public Boolean getIsTaxable() {
		return isTaxable;
	}

	public void setIsTaxable(Boolean isTaxable) {
		this.isTaxable = isTaxable;
	}

	public TYPE getType() {
		return type;
	}

	public void setType(TYPE type) {
		this.type = type;
	}

	public SOURCE getSource() {
		return source;
	}

	public void setSource(SOURCE source) {
		this.source = source;
	}

	public String getOrigin() {
		return origin;
	}

	public void setOrigin(String origin) {
		this.origin = origin;
	}

	public STATUS getStatus() {
		return status;
	}

	public void setStatus(STATUS status) {
		this.status = status;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getSpecialPrice() {
		return specialPrice;
	}

	public void setSpecialPrice(Double specialPrice) {
		this.specialPrice = specialPrice;
	}

	public String getPriceUnit() {
		return priceUnit;
	}

	public void setPriceUnit(String priceUnit) {
		this.priceUnit = priceUnit;
	}

	public String getChinesePriceUnit() {
		return chinesePriceUnit;
	}

	public void setChinesePriceUnit(String chinesePriceUnit) {
		this.chinesePriceUnit = chinesePriceUnit;
	}

	public String getFrenchPriceUnit() {
		return frenchPriceUnit;
	}

	public void setFrenchPriceUnit(String frenchPriceUnit) {
		this.frenchPriceUnit = frenchPriceUnit;
	}

	public String getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(String unitPrice) {
		this.unitPrice = unitPrice;
	}

	public String getChineseUnitPrice() {
		return chineseUnitPrice;
	}

	public void setChineseUnitPrice(String chineseUnitPrice) {
		this.chineseUnitPrice = chineseUnitPrice;
	}

	public String getFrenchUnitPrice() {
		return frenchUnitPrice;
	}

	public void setFrenchUnitPrice(String frenchUnitPrice) {
		this.frenchUnitPrice = frenchUnitPrice;
	}

	public Long getInventory() {
		return inventory;
	}

	public void setInventory(Long inventory) {
		this.inventory = inventory;
	}

	public Double getSpecification() {
		return specification;
	}

	public void setSpecification(Double specification) {
		this.specification = specification;
	}

	public String getSpecificationDesc() {
		return specificationDesc;
	}

	public void setSpecificationDesc(String specificationDesc) {
		this.specificationDesc = specificationDesc;
	}

	public String getChineseSpecificationDesc() {
		return chineseSpecificationDesc;
	}

	public void setChineseSpecificationDesc(String chineseSpecificationDesc) {
		this.chineseSpecificationDesc = chineseSpecificationDesc;
	}

	public String getFrenchSpecificationDesc() {
		return frenchSpecificationDesc;
	}

	public void setFrenchSpecificationDesc(String frenchSpecificationDesc) {
		this.frenchSpecificationDesc = frenchSpecificationDesc;
	}

	public String getStockUnit() {
		return stockUnit;
	}

	public void setStockUnit(String stockUnit) {
		this.stockUnit = stockUnit;
	}

	public String getChineseStockUnit() {
		return chineseStockUnit;
	}

	public void setChineseStockUnit(String chineseStockUnit) {
		this.chineseStockUnit = chineseStockUnit;
	}

	public String getFrenchStockUnit() {
		return frenchStockUnit;
	}

	public void setFrenchStockUnit(String frenchStockUnit) {
		this.frenchStockUnit = frenchStockUnit;
	}

	public Double getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(Double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	public String getPurchaseUnit() {
		return purchaseUnit;
	}

	public void setPurchaseUnit(String purchaseUnit) {
		this.purchaseUnit = purchaseUnit;
	}

	public Integer getPurchaseToPriceSpec() {
		return purchaseToPriceSpec;
	}

	public void setPurchaseToPriceSpec(Integer purchaseToPriceSpec) {
		this.purchaseToPriceSpec = purchaseToPriceSpec;
	}

	public Integer getRecommendIndex() {
		return recommendIndex;
	}

	public void setRecommendIndex(Integer recommendIndex) {
		this.recommendIndex = recommendIndex;
	}

	public Integer getOrderLimit() {
		return orderLimit;
	}

	public void setOrderLimit(Integer orderLimit) {
		this.orderLimit = orderLimit;
	}

	public String getShortMessage() {
		return shortMessage;
	}

	public void setShortMessage(String shortMessage) {
		this.shortMessage = shortMessage;
	}

	public String getChineseShortMessage() {
		return chineseShortMessage;
	}

	public void setChineseShortMessage(String chineseShortMessage) {
		this.chineseShortMessage = chineseShortMessage;
	}

	public String getFrenchShortMessage() {
		return frenchShortMessage;
	}

	public void setFrenchShortMessage(String frenchShortMessage) {
		this.frenchShortMessage = frenchShortMessage;
	}
	
	public java.util.Date getBestBefore() {
		return bestBefore;
	}


	public void setBestBefore(java.util.Date bestBefore) {
		this.bestBefore = bestBefore;
	}


	public Boolean getIsFreshFood() {
		return isFreshFood;
	}

	public void setIsFreshFood(Boolean isFreshFood) {
		this.isFreshFood = isFreshFood;
	}

	public void setProductInfo(ProductInfo productInfo) {
		this.productInfo = productInfo;
	}

	public Boolean getIsFrozenFood() {
		return isFrozenFood;
	}


	public void setIsFrozenFood(Boolean isFrozenFood) {
		this.isFrozenFood = isFrozenFood;
	}


	public List<Picture> getPictures() {
		return pictures;
	}

	public void setPictures(List<Picture> pictures) {
		this.pictures = pictures;
	}

	public Supplier getSupplier() {
		return supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}

	public List<PurchaseSchedule> getPurchaseSchedules() {
		return purchaseSchedules;
	}

	public void setPurchaseSchedules(List<PurchaseSchedule> purchaseSchedules) {
		this.purchaseSchedules = purchaseSchedules;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Override
	public String toString() {
		return "Product [quantity=" + quantity + ", id=" + id + ", name="
				+ name + ", chineseName=" + chineseName + ", frenchName="
				+ frenchName + ", number=" + number + ", isOrganic="
				+ isOrganic + ", type=" + type + ", source=" + source
				+ ", status=" + status + ", price=" + price + ", specialPrice="
				+ specialPrice + ", priceUnit=" + priceUnit
				+ ", chinesePriceUnit=" + chinesePriceUnit
				+ ", frenchPriceUnit=" + frenchPriceUnit + ", unitPrice="
				+ unitPrice + ", chineseUnitPrice=" + chineseUnitPrice
				+ ", frenchUnitPrice=" + frenchUnitPrice + ", inventory="
				+ inventory + ", specification=" + specification
				+ ", specificationDesc=" + specificationDesc
				+ ", chineseSpecificationDesc=" + chineseSpecificationDesc
				+ ", frenchSpecificationDesc=" + frenchSpecificationDesc
				+ ", stockUnit=" + stockUnit + ", chineseStockUnit="
				+ chineseStockUnit + ", frenchStockUnit=" + frenchStockUnit
				+ ", purchaseUnit=" + purchaseUnit + ", purchaseToPriceSpec="
				+ purchaseToPriceSpec + ", icon=" + icon + ", recommendIndex="
				+ recommendIndex + ", orderLimit=" + orderLimit
				+ ", shortMessage=" + shortMessage + ", chineseShortMessage="
				+ chineseShortMessage + ", frenchShortMessage="
				+ frenchShortMessage + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((inventory == null) ? 0 : inventory.hashCode());
		result = prime * result
				+ ((isOrganic == null) ? 0 : isOrganic.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((number == null) ? 0 : number.hashCode());
		result = prime * result
				+ ((orderLimit == null) ? 0 : orderLimit.hashCode());
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		result = prime * result
				+ ((priceUnit == null) ? 0 : priceUnit.hashCode());
		result = prime
				* result
				+ ((purchaseToPriceSpec == null) ? 0 : purchaseToPriceSpec
						.hashCode());
		result = prime * result
				+ ((purchaseUnit == null) ? 0 : purchaseUnit.hashCode());
		result = prime * result
				+ ((quantity == null) ? 0 : quantity.hashCode());
		result = prime * result
				+ ((recommendIndex == null) ? 0 : recommendIndex.hashCode());
		result = prime * result
				+ ((shortMessage == null) ? 0 : shortMessage.hashCode());
		result = prime * result + ((source == null) ? 0 : source.hashCode());
		result = prime * result
				+ ((specialPrice == null) ? 0 : specialPrice.hashCode());
		result = prime * result
				+ ((specification == null) ? 0 : specification.hashCode());
		result = prime
				* result
				+ ((specificationDesc == null) ? 0 : specificationDesc
						.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result
				+ ((stockUnit == null) ? 0 : stockUnit.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result
				+ ((unitPrice == null) ? 0 : unitPrice.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Product other = (Product) obj;
		if (inventory == null) {
			if (other.inventory != null)
				return false;
		} else if (!inventory.equals(other.inventory))
			return false;
		if (isOrganic == null) {
			if (other.isOrganic != null)
				return false;
		} else if (!isOrganic.equals(other.isOrganic))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (number == null) {
			if (other.number != null)
				return false;
		} else if (!number.equals(other.number))
			return false;
		if (orderLimit == null) {
			if (other.orderLimit != null)
				return false;
		} else if (!orderLimit.equals(other.orderLimit))
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals(other.price))
			return false;
		if (priceUnit == null) {
			if (other.priceUnit != null)
				return false;
		} else if (!priceUnit.equals(other.priceUnit))
			return false;
		if (purchaseToPriceSpec == null) {
			if (other.purchaseToPriceSpec != null)
				return false;
		} else if (!purchaseToPriceSpec.equals(other.purchaseToPriceSpec))
			return false;
		if (purchaseUnit == null) {
			if (other.purchaseUnit != null)
				return false;
		} else if (!purchaseUnit.equals(other.purchaseUnit))
			return false;
		if (quantity == null) {
			if (other.quantity != null)
				return false;
		} else if (!quantity.equals(other.quantity))
			return false;
		if (recommendIndex == null) {
			if (other.recommendIndex != null)
				return false;
		} else if (!recommendIndex.equals(other.recommendIndex))
			return false;
		if (shortMessage == null) {
			if (other.shortMessage != null)
				return false;
		} else if (!shortMessage.equals(other.shortMessage))
			return false;
		if (source != other.source)
			return false;
		if (specialPrice == null) {
			if (other.specialPrice != null)
				return false;
		} else if (!specialPrice.equals(other.specialPrice))
			return false;
		if (specification == null) {
			if (other.specification != null)
				return false;
		} else if (!specification.equals(other.specification))
			return false;
		if (specificationDesc == null) {
			if (other.specificationDesc != null)
				return false;
		} else if (!specificationDesc.equals(other.specificationDesc))
			return false;
		if (status != other.status)
			return false;
		if (stockUnit == null) {
			if (other.stockUnit != null)
				return false;
		} else if (!stockUnit.equals(other.stockUnit))
			return false;
		if (supplier == null) {
			if (other.supplier != null)
				return false;
		} else if (!supplier.equals(other.supplier))
			return false;
		if (type != other.type)
			return false;
		if (unitPrice == null) {
			if (other.unitPrice != null)
				return false;
		} else if (!unitPrice.equals(other.unitPrice))
			return false;
		return true;
	}

	public UploadedFile getIcon16() {
		return icon16;
	}

	public void setIcon16(UploadedFile icon16) {
		this.icon16 = icon16;
	}

	public UploadedFile getIcon32() {
		return icon32;
	}

	public void setIcon32(UploadedFile icon32) {
		this.icon32 = icon32;
	}

	public UploadedFile getIcon64() {
		return icon64;
	}

	public void setIcon64(UploadedFile icon64) {
		this.icon64 = icon64;
	}

	public UploadedFile getIcon128() {
		return icon128;
	}

	public void setIcon128(UploadedFile icon128) {
		this.icon128 = icon128;
	}

}
